#!/usr/bin/env sh

mysql -uroot -p${MYSQL_ROOT_PASSWORD} << EOF
DROP DATABASE IF EXISTS \`nacos-config\`;
CREATE DATABASE \`nacos-config\` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
USE \`nacos-config\`;

SOURCE /tmp/nacos-config.sql;
EOF


mysql -uroot -p${MYSQL_ROOT_PASSWORD} << EOF
DROP DATABASE IF EXISTS \`ruoyi-vue-pro\`;
CREATE DATABASE \`ruoyi-vue-pro\` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
USE \`ruoyi-vue-pro\`;

SOURCE /tmp/ruoyi-vue-pro.sql;
EOF
